//转译  时间
function getFormateDate(type,numb){
  let curDate = new Date(),
      num  = numb ? 1 :0,
      date = new Date(curDate.getTime() + 24*60*60*1000 * num), //后一天
      year = date.getFullYear(),
      month = (date.getMonth()+1)<10?'0'+(date.getMonth()+1):(date.getMonth()+1),
      day = date.getDate()<10?'0'+date.getDate():date.getDate(),
      hours = date.getHours()<10?'0'+date.getHours():date.getHours(),
      min = date.getMinutes()<10?'0'+date.getMinutes():date.getMinutes(),
      sec = date.getSeconds()<10?'0'+date.getSeconds():date.getSeconds();


    if(type =='1'){
      return year+'-'+month+'-'+day+' '+hours+':'+min+':'+sec;
    } else if(type =='2'){
      return year+'-'+month+'-'+day;
    } else{
      return [year,month,day]
    }
}


export {
  getFormateDate
}